/**
 * @author wcj
 * @Date 2021/6/7 12:10
 * @Version 1.0
 */
public class VolatileDoubleCheck {

    private volatile static VolatileDoubleCheck instance;

    public static VolatileDoubleCheck getInstance() {
        if (instance == null) {
            synchronized (VolatileDoubleCheck.class) {
                if (instance == null) {
                    instance = new VolatileDoubleCheck();
                }
            }
        }
        return instance;
    }
}
